#include <iostream>
#include <sw/redis++/redis++.h>
using namespace std;
using namespace sw::redis;

int main()
{
    Redis redis = Redis("tcp://127.0.0.1:6379");

    // auto str = redis.command("select");
    // cout << *str->element << endl;

    auto it = redis.get("name");
    if (!it)
    {
        cout << "not find " << "name" << endl;
    }
    else
    {
        cout << "find key = " << *it << endl;
    }

    it = redis.get("test");
    if (!it)
    {
        cout << "not find " << "test" << endl;
    }
    else
    {
        cout << "find key = " << *it << endl;
    }

    return 0;
}